package com.tedu.mapper;

import com.tedu.pojo.Voucher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/10/30
 */
@Mapper
public interface VoucherMapper {

    @Select("select count(1) from tb_voucher")
    int getRowCount();

    @Select("select * from tb_voucher order by createdTime desc limit #{startIndex},#{pageSize}")
    List<Voucher> findPageObjects(Integer startIndex, Integer pageSize);
}
